class GoogleCachedSearchEngine < SearchEngine

	def initialize(obj_ref, wlist, bsize)
		super(obj_ref, wlist, bsize)
	end #init
		
	def search(num_of_pages)
		super(num_of_pages)
		for query in @searchString
				$logger.info("GoogleSearchEngine") {"query -> #{query}"}
				q = GScraper::Search.query(:query => query)
				for i in 0...$num_of_pages
					q.each_on_page(i) do |result|
						cached = result.cached_url
						if (cached.kind_of?(URI::HTTP)) # exclude URI::Generic obj
							(cached.query+="&gl=it&strip=1")
							@tmpList << cached # dovrebbe essere ok
						end #if
					end # do
				end #for
			end # for
			@urlManager.add_urls(@tmpList)
			return @urlManager
	end #search
		
end #class
